//导入vue-router包

import VueRouter from 'vue-router'

//导入对应组件

import HomeContariner from './components/tabbar/HomeContariner.vue'
import MemberContariner from './components/tabbar/MemberContariner.vue'
import ShopcarContariner from './components/tabbar/ShopcarContariner.vue'
import SearchContariner from './components/tabbar/SearchContariner.vue'
import NewsList from './components/news/NewsList.vue'
import NewsInfo from './components/news/NewsInfo.vue'
import PhotoList from './components/photo/PhotoList.vue'
import PhotoInfo from './components/photo/PhotoInfo.vue'
import GoodsList from './components/goods/GoodsList.vue'
import GoodsInfo from './components/goods/GoodsInfo.vue'
import GoodsDesc from './components/goods/GoodsDesc.vue'
import GoodsComment from './components/goods/GoodsComment.vue'

var route=new VueRouter({
    routes:[
        {path:'/',redirect:'/home'},
        {path:'/home',component:HomeContariner},
        {path:'/member',component:MemberContariner},
        {path:'/shopcar',component:ShopcarContariner},
        {path:'/search',component:SearchContariner},
        {path:'/home/newslist',component:NewsList},
        {path:'/home/newsinfo/:id',component:NewsInfo},
        {path:'/home/photolist/',component:PhotoList},
        {path:'/home/photoinfo/:id',component:PhotoInfo},
        {path:'/home/goodslist',component:GoodsList},
        {path:'/home/goodsinfo/:id',component:GoodsInfo},
        {path:'/home/goodsdesc/:id',component:GoodsDesc,name:'goodsdesc'},
        {path:'/home/goodscomment/:id',component:GoodsComment,name:'goodscomment'}

    ],
    linkActiveClass:'mui-active'//覆盖路由默认高亮的类已达到点击那个那个就高亮
})

export default route